package view
{
	import events.FarmClickEvent;
	
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Point;
	import flash.net.URLRequest;
	
	import org.osmf.net.StreamingURLResource;
	
	public class Map extends Sprite
	{
		
		
		private var _url:String
		public function Map()
		{
			
		}

		public function get url():String
		{
			return _url;
		}

		public function set url(value:String):void
		{
			_url = value;
			addBg();
		}

		/**
		 *加载背景 
		 * 
		 */		
		private function addBg():void
		{
			if(!bg)
			{
			var bg:Loader = new Loader();
			addChild(bg);
			}
			bg.load(new URLRequest(url));
		}		
		
	}
}